package com.qf.controller;

import com.qf.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by luoxinmin on 2020/6/12.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/index")
    public String index() {
        return "index";//  /WEB-INF/view/index.html
    }

    @RequestMapping(value = "/load", method = RequestMethod.GET)
    public String load(int id, String name) {
        System.out.println(id + "\t" + name);
        System.out.println("load param.....");
        return "success";
    }

    @RequestMapping("/regist")
    public String regist(User user){
        System.out.println(user.toString());
        return "";
    }
}
